// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_CONTRACT_DETAIL_NEW
// * CreateDate    : 2012/2/13 13:47:11
// * Creater       : CodeSmith
// * LastChangeDate: 2012/2/13 13:47:11
// * LastChanger   : 2012/2/13 13:47:11
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class SalesContractDetailNewEntity : EntityBase
    {
        public SalesContractDetailNewTable TableSchema
        {
            get
            {
                return SalesContractDetailNewTable.Current;
            }
		}
		
		public SalesContractDetailNewEntity()
        {

        }
		
		public SalesContractDetailNewEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
			this.TotalAmount = Convert.ToString(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.ContractItem2 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM2"]));
			this.ContractItem3 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM3"]));
			this.ContractItem4 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM4"]));
			this.ContractItem5 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM5"]));
			this.ContractItem6 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM6"]));
			this.ContractItem7 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM7"]));
			this.ContractItem8 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM8"]));
			this.ContractItem9 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM9"]));
			this.ContractItem10 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM10"]));
			this.ContractItem11 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM11"]));
			this.ContractItem12 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM12"]));
			this.ContractItemOther1 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER1"]));
			this.ContractItemOther2 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER2"]));
			this.ContractItemOther3 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER3"]));
			this.ContractItemOther4 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER4"]));
            this.ContractItemOther5 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER5"]));
            this.ContractFromDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_FROM_DATE"]));
            this.ContractEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_END_DATE"]));
        }
		
		public SalesContractDetailNewEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
			this.TotalAmount = Convert.ToString(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.ContractItem2 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM2"]));
			this.ContractItem3 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM3"]));
			this.ContractItem4 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM4"]));
			this.ContractItem5 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM5"]));
			this.ContractItem6 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM6"]));
			this.ContractItem7 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM7"]));
			this.ContractItem8 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM8"]));
			this.ContractItem9 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM9"]));
			this.ContractItem10 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM10"]));
			this.ContractItem11 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM11"]));
			this.ContractItem12 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM12"]));
			this.ContractItemOther1 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER1"]));
			this.ContractItemOther2 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER2"]));
			this.ContractItemOther3 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER3"]));
			this.ContractItemOther4 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER4"]));
            this.ContractItemOther5 = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_ITEM_OTHER5"]));
            this.ContractFromDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_FROM_DATE"]));
            this.ContractEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_END_DATE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesContractDetailNewTable.Current;
            }
        }
		
		#region Perporty List
        public string OrderId
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_ORDER_ID)); }
            set { SetData(SalesContractDetailNewTable.C_ORDER_ID, value); }
        }
		
        public string TotalAmount
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_TOTAL_AMOUNT)); }
            set { SetData(SalesContractDetailNewTable.C_TOTAL_AMOUNT, value); }
        }
		
        public string ContractItem2
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM2)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM2, value); }
        }
		
        public string ContractItem3
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM3)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM3, value); }
        }
		
        public string ContractItem4
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM4)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM4, value); }
        }
		
        public string ContractItem5
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM5)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM5, value); }
        }
		
        public string ContractItem6
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM6)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM6, value); }
        }
		
        public string ContractItem7
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM7)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM7, value); }
        }
		
        public string ContractItem8
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM8)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM8, value); }
        }
		
        public string ContractItem9
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM9)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM9, value); }
        }
		
        public string ContractItem10
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM10)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM10, value); }
        }
		
        public string ContractItem11
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM11)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM11, value); }
        }
		
        public string ContractItem12
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM12)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM12, value); }
        }
		
        public string ContractItemOther1
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER1)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER1, value); }
        }
		
        public string ContractItemOther2
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER2)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER2, value); }
        }
		
        public string ContractItemOther3
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER3)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER3, value); }
        }
		
        public string ContractItemOther4
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER4)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER4, value); }
        }
		
        public string ContractItemOther5
        {
            get { return Convert.ToString(GetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER5)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_ITEM_OTHER5, value); }
        }

        public DateTime ContractFromDate
        {
            get { return Convert.ToDateTime(GetData(SalesContractDetailNewTable.C_CONTRACT_FROM_DATE)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_FROM_DATE, value); }
        }

        public DateTime ContractEndDate
        {
            get { return Convert.ToDateTime(GetData(SalesContractDetailNewTable.C_CONTRACT_END_DATE)); }
            set { SetData(SalesContractDetailNewTable.C_CONTRACT_END_DATE, value); }
        }
		
		#endregion
	}
	
	
}	

